package game.structures;

/**
 * Generic, primitive class representing a 2D point.
 * @author Ronald C. Tallman
 *
 */

public class Point {

	float x, y;
	
	public Point(float x, float y) {
		this.x = x;
		this.y = y;
	}
	
	public Point(String x, String y) {
		this.x = Float.parseFloat(x);
		this.y = Float.parseFloat(y);
	}
	
	public float getX() {
		return x;
	}
	
	public float getY() {
		return y;
	}
	
	public void addX(float x) {
		this.x += x;
	}
	
	public void addY(float y) {
		this.y += y;
	}
	
	public String toString() {
		String s = "";
		
		s += "(X: " + x + " Y: " + y + ")";
		
		return s;
	}
}
